<html>
<head>
<link href="../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">		
		<center><h3>Topology Triangle2EdgeTopologicalMapping</h3></center>
	        <center><img src="TopologyTriangle2EdgeTopologicalMapping_01.png" width="300" name="TopologyTriangle2EdgeTopologicalMapping" align="middle"></center>		  
	<br>	
	<div id="orangeText">Description</div>
	<br>
<div align="left">
	The aim of this tutorial is to show the interest of using a topological mapping between a 2D surface mesh and a 1D linear mesh. In this tutorial, a soft tissues is represented, implying:
	  <ul>
		<li>A mesh loader to read mesh file.</li>
		<li>A mechanicalObject with geometry point positions.</li>
		<li>A mass for gravity and fixed points.</li>
		<li>A FEM forcefield to create interactions between points</li>
		<li>An ODE scheme and a linear solver to solve the system at each time step.</li>
		<li>Dynamic topological components.</li>
		<li>A visual model which reproduces the current model geometry thanks to the identity mapping.</li>
	</ul>
        <br>
	<div id="orangeText">Key points</div>
	<br>
	Under the first node representing the triangulation, a second node is used to represent the linear topology.
	<br>
	This second representation won't reproduce all edges of the triangulation, but only edges on the mesh borders. I.e edges with only one adjacent triangle. 
	<br>
	They are represented in green in the simulation.
	<br>
	<br>
	To create this mapping, the component <b>Triangle2EdgeTopologicalMapping</b> is used. This component takes an input topology (Data Object1) which is the container of the "upper" topology (triangulation here) and has an output topology (Data Object2) which is the container of the above topology (edges here).
	<br>	
	<br>
	<div id="orangeText">Results</div>
	<br>
	In this simulation, both triangulation and edge mesh have spring forcefields to create interaction between points. Thus, when simulating, the soft tissue won't stretch.
	<br>
	Try to remove the <b>TriangularBendingSprings</b> component. The result will be a tissue completely stretched.
	<br>
	<br>
	Finally, try to remove the <b>MeshSringForceField</b> component. The result will be a bad behavior of the mesh borders.
	<br>
	<center><img src="TopologyTriangle2EdgeTopologicalMapping_02.png" width="300" name="TopologyTriangle2EdgeTopologicalMapping" align="middle">
	</center>
	<br>
	<ul>
	  <li><div id="orangeText">Additional results</div></li>	
	<br>
	When deleting triangles, the topological mapping is updated and so is the list of border edges.
	</ul>
</div>
</div>
</body>
</html>
